﻿using System;
using System.Collections.Generic;
using System.Text;
using Watchdog.Dal;
using Watchdog.Bll;
using Watchdog.Bll.Base;

namespace Watchdog.Bll.Factory {

    public partial class TestStatusFactory {
        public static void Delete ( TestStatusBase teststatus ) {
            DataClient.Current.TestStatusDelete ( teststatus.IntData );
        }

        public static List<TestStatus> GetById ( int test ) {
		    List<TestStatus> outlist = new List<TestStatus> ();
            Watchdog.Facade.TestStatus[] list = Dal.DataClient.Current.TestStatusGetByTest ( test );
            foreach (Watchdog.Facade.TestStatus item in list)
                outlist.Add ( (TestStatus)new TestStatusBase ( item ) );
            return outlist;
            // return DataClient.Current.TestStatusGetByTest ( test );
        }
        public static void Insert ( TestStatusBase teststatus ) {
            teststatus.IntData = DataClient.Current.TestStatusInsert ( teststatus.IntData );
        }
		
        public static void Update ( TestStatusBase teststatus ) {
            DataClient.Current.TestStatusUpdate ( teststatus.IntData );
        }
		
	}
}
